---
title: Discard a bill
summary: A user discards the current bill, which sets its status to discarded and then either returns to the Inbox or, with Auto feed checked, loads the next queue bill.
status: draft
owner: Claims
last_reviewed: 2026-09-30
operation_id: discard-bill
trigger: User selects Discard on the Bill entry screen
---

# Discard a bill

A user discards the current bill, which sets its status to discarded and then either returns to the Inbox or, with Auto feed checked, loads the next queue bill.

## Trigger and screens

| Item | Detail |
| --- | --- |
| Trigger | User selects Discard on the Bill entry screen |
| Screens | [Bill entry](../../screens/entry.md) |
| Tables | Not traced** |

## Steps

1. When the screen loads, `Entry.Index` checks `CBEDiscardBill` and hides the Discard button when it is missing ([BR-SCR-006](../business-rules.md#br-scr-006-discard-permission-is-enforced-client-side-only)).
2. The user selects Discard and confirms.
3. The screen posts to [Entry.DiscardBill](../hosted-endpoints.md#entry.discardbill).
   1. The action maps the posted worker to a `Bill` with AutoMapper.
   2. The action calls `IBillEntryService.UpdateBillStatus` with the bill id, the mail id `SYSTEM` and the status `DIS`. It does not check `CBEDiscardBill` ([BR-SCR-006](../business-rules.md#br-scr-006-discard-permission-is-enforced-client-side-only)).
   3. The action reads the remaining queue count with `IBillEntryService.GetClaimBillQueueRemainingCount` and returns the bill view model as JSON.

   > **Origin**: Steps 3.2–3.3 are the controller-side calls to `IBillEntryService` in `SAIF.SAIFCode.Core`†. Per the Legends CLI RAG service, `SAIF.SAIFCode.Core` is a contracts-only library and this interface's implementation lives outside it (most likely `SAIF.Services`), which this run did not trace*.
4. On success the client checks the Auto feed checkbox (`ClaimBillEntry/js/ClaimBillEntry.entry.js:255-263`).
   1. When Auto feed is checked, the screen loads the next queue bill through `getNextQueueBill` and stays on Bill entry.
   2. When Auto feed is not checked, the browser navigates to the [Inbox](../../screens/inbox.md) screen.

## Process flow

The diagram shows the main path and its decision points.

```mermaid
flowchart TD
    A["Bill entry loads"] --> B{"CBEDiscardBill held?"}
    B -->|"No"| X["Discard button hidden"]
    B -->|"Yes"| C["User selects Discard"]
    C --> D["DiscardBill sets status DIS"]
    D --> G{"Auto feed checked?"}
    G -->|"Yes"| H["Load next queue bill<br>(stay on Bill entry)"]
    G -->|"No"| E["Navigate to Inbox"]
```

## Failure and edge-case behavior

- Because the server does not check the permission, any user in the `CBPEnterBill` role who calls the endpoint directly can discard a bill ([BR-SCR-006](../business-rules.md#br-scr-006-discard-permission-is-enforced-client-side-only); see [Tech debt](../tech-debt.md)).

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [Hosted endpoints](../hosted-endpoints.md)
- [Data model](../data-model.md)
- [Architecture](../architecture.md)
- [Tech debt](../tech-debt.md)
- [Screen catalog](../../screens/index.md)

> **Note:** Statements marked with `†` are derived from dependency library
> documentation via the Legends CLI. Statements marked with `*` were inferred
> from code structure or contextual evidence. Statements marked with `**` could
> not be confirmed; treat as unknown until verified.

## Sources
- ClaimBillEntry/Controllers/EntryController.cs
- ClaimBillEntry/js/ClaimBillEntry.entry.js